let users = {
    Alan: {
        age: 27,
        online: false
    },
    Jeff: {
        age: 32,
        online: true
    },
    Sarah: {
        age: 48,
        online: false
    },
    Ryan: {
        age: 19,
        online: true
    }
};

function countOnline(obj) {
    // 请把你的代码写在这条注释以下
    let count = 0;
    let user;
    for (let key in users) {
        user = users[key];
        if (user.online) {
            count++;
        }
    }
    return count;
    // 请把你的代码写在这条注释以上
}

console.log(countOnline(users));
